    .text                     # Start text section
    #.balign 4                # align section to 4 bytes - which is also the default?
    .global solve         # define global function symbol
solve:
	vsetvli t0, a0, e32, m2, ta, ma # Set vector length based on 32-bit vectors
	vle32.v v4, (a1)
	vle32.v v8, (a2)

	vmin.vv v0, v4, v8

	vse32.v v0, (a1)

	sub a0, a0, t0
	slli t0, t0, 2
	add a1, a1, t0
	add a2, a2, t0

	bnez a0, solve
	ret
